﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Collections;
using Sunny.UI;

namespace Ui
{
    public partial class Form5 : UIForm
    {
        public Form5()
        {
            InitializeComponent();
        }

        private void Form5_Load(object sender, EventArgs e)
        {

        }

        private void panel4_Paint(object sender, PaintEventArgs e)
        {

        }

        public void create_panel()
        {
            Panel panelx = new Panel();

        }

        private void iconButton2_Click(object sender, EventArgs e)
        {
        }

        private void flowLayoutPanel1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void panel3_Paint(object sender, PaintEventArgs e)
        {

        }
        struct str{

        }
        public void create_tabel()
        {
            foreach (Panel item in flowLayoutPanel1.Controls)
            {
                foreach (var item1 in item.Controls)
                {
                    if(item1 is TextBox)
                    {
                        TextBox textBox = (TextBox)item1;
                        MessageBox.Show(textBox.Text);
                    }
                    else if(item1 is ComboBox)
                    {
                        ComboBox comBox = (ComboBox)item1;
                        MessageBox.Show(comBox.Text);
                        if (comBox.Text != "")
                        {
                            
                        }
                    }
                }
            }
        }

        public void sreate_file()
        {
            string path = @"C:\Users\PC\Desktop\新建文件夹";
            File.Create(path+@"\"+textBox1.Text+".adb").Close();
            string path1 = path + @"\" + textBox1.Text + ".adb";
            string s=null;
            foreach (var item in str1)
            {
                s += item;
            }
            File.WriteAllLines(path1, new string[]{ "#"+s});
        }

        ArrayList str1 = new ArrayList();

        private void button1_Click_1(object sender, EventArgs e)
        {
            richTextBox1.Text += "属性名:" + textBox2.Text + "\t类型" + comboBox1.Text + "\n";
            str1.Add(textBox2.Text + "@" + comboBox1.Text + "!");
        }

        private void iconButton1_Click_1(object sender, EventArgs e)
        {
            sreate_file();
        }
    }
}
